<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script type="text/javascript">
    'use strict';

    // indexOf，返回目标字符串的索引位置，无则返回-1
    console.log('aabcdedddd'.indexOf('bcd')); // 2

    // includes
    console.log('abcde'.includes('abc')); // true

    // startWith
    console.log('bbnm'.startsWith('bb')); // true
    console.log('ppkll'.endsWith('kll')); // true

    // repeat(n) 将字符串重复n次得到一个新字符串返回，并且原字符串不变
    console.log('dh'.repeat(5)); // dhdhdhdhdh

</script>